package org.bee.input;

import org.bee.check.Length;
import org.bee.check.NotNull;
import org.bee.check.Regex;
import org.bee.model.BaseModel;

public class MyUpdate implements BaseModel {

    /**
     * 昵称
     */
    @NotNull
    @Length(min = 2,max = 16,msg="昵称长度为2-16位")
    private String nickname;
    /**
     * 头像
     */
    @NotNull
    @Length(min = 0,max = 255,msg="头像链接长度最长为255")
    @Regex(value = "https?://[^\\s]*\\.(?:jpg|jpeg|png|gif)$",msg = "头像必须是图片链接")
    private String avatar;

    /**
     * 手机号
     */
    @NotNull
    @Regex(value = "^1[3-9]\\d{9}$", msg = "手机号格式不正确")
    private String phone;

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
